package main

import "fmt"

type Printer interface {
	Print()
}

type StringPinter struct {
	Content string
}

func (sp *StringPinter) Print() {
	fmt.Println(sp.Content)
}

func main() {

	// var c = StringPinter{Content: "hello world"}
	// c.Print()
	// var sp Printer = &c
	// sp.Print()

	var i interface{} = "a"

	s, ok := i.(string)
	if ok {
		fmt.Println(s)
	}

	defer func() {
		if err := recover(); err != nil {
			fmt.Println("err")
		}
	}()

}
